package com.tingfeng.lrk.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tingfeng.lrk.entity.Student;
import com.tingfeng.lrk.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 学生表 前端控制器
 * </p>
 *
 * @author 刘仁奎
 * @since 2018-10-27
 */
@RestController
@RequestMapping("/student")
public class StudentController {


    @Autowired
    private IStudentService service;

    @GetMapping("/list")
    public Object list() {
        List<Student> students = service.list(new QueryWrapper<>());
        return students;
    }
}
